const state = {
    keepAliveIncludes: <Array<string>>[],
    noKeepAliveViews: <Array<string>>[]
};

const getters = {
    keepAliveIncludes: (state: any): Array<string> => state.keepAliveIncludes,
    noKeepAliveViews: (state: any): Array<string> => state.noKeepAliveViews
};

const mutations = {
    SET_KEEP_ALIVE_VIEWS(state: any, data: Array<string>): void {
        state.keepAliveIncludes = data;
    },
    SET_NOKEEP_ALIVE_VIEWS(state: any, data: Array<string>): void {
        state.noKeepAliveViews = data;
    }
};

const actions = {
    setKeepAliveViews({ commit }: any, data: Array<string>): void {
        commit('SET_KEEP_ALIVE_VIEWS', data);
    },
    setNoKeepAliveViews({ commit }: any, data: Array<string>): void {
        commit('SET_NOKEEP_ALIVE_VIEWS', data);
    }
};

export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
};
